package com.taiji.dicom4cloud.common.security.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.taiji.dicom4cloud.common.model.dto.UserInfo;
import com.taiji.dicom4cloud.common.model.entity.SysUser;
import org.springframework.security.core.GrantedAuthority;

import java.util.Collection;

/**
 * @Description
 * @Author fanxl
 * @Date 2021/5/20
 **/
public interface IUserDetailService extends IService<SysUser> {

    /**
     * 根据用户名获取用户信息
     *
     * @param username
     * @return
     */
    SysUser getByUsername(String username);

    /**
     * 获取用户信息
     *
     * @param sysUser
     * @return
     */
    Collection<? extends GrantedAuthority> getUserInfo(SysUser sysUser);
}
